<template>
  <div>
    <button @click="bun_menu()">弹出菜单</button>

  </div>
</template>

<style scoped>
</style>

<script>



  const { remote } = require('electron')
  const { Menu, MenuItem } = remote

  const menu = new Menu()
  menu.append(new MenuItem({ label: 'MenuItem1', click() { console.log('item 1 clicked') } }))
  menu.append(new MenuItem({ type: 'separator' }))
  menu.append(new MenuItem({ label: 'MenuItem2', type: 'checkbox', checked: true }))

  export default {
    name: '',
    //传参：父传子，写法：["形参1"[,"形参2"]]
    props: {

    },
    created() {

    },
    mounted() {

    },
    data() {
      return {

      }
    },
    methods: {
      bun_menu() {
        menu.popup()

      }

    },
    mixins: [],
    components: {

    },
  }
</script>